<nav class="navbar navbar-default" style="margin-bottom:0px">
  <div class="container">
    <div class="navbar-header">
      <a href="<?php echo site_url('blog/index') ;?>">
      <img src="<?php echo base_url();?>public/img/logo.png" style="height:50px;width:200px;" class="pull-left"/></a>
    </div>
    <div class="collapse navbar-collapse " id="bs-example-navbar-collapse-1">
      <ul class="nav navbar-nav navbar-right nav-tabs header_nav">
      	<li <?php if($catalog_id==0){ ?> class="active" <?php  } ?>><a href="<?php echo site_url('blog/index') ;?>">首页</a></li>
      <?php foreach($catalogs as $catalog){ ?>
        <li <?php if($catalog_id==$catalog->id){ ?> class="active" <?php  } ?>><a href="<?php echo site_url('blog/lists/'.$catalog->id) ;?>"><?php echo $catalog->name; ?></a></li>
      <?php } ?>
      </ul>
    </div>
  </div>
</nav>